package com.open.video.service.impl;
import feign.RequestInterceptor;
import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Bean;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

@Component("feignService")
@FeignClient(value = "FILE-CENTER",fallback = FeignServiceImpl.class,configuration = FeignService.MyConfig.class)
public interface FeignService {

    @PostMapping("/file-tset")
    String test(@RequestParam("test") String test);
    class MyConfig {
        @Bean
        public Encoder feignFormEncoder() {
            return  new SpringFormEncoder();
        }
    }
}

